﻿using System;
using System.Web;
using System.Web.Routing;
using FubuMVC.Core;
using FubuMVC.StructureMap;
using StructureMap;

namespace simple
{
    public class Global 
        : HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            FubuApplication
                .For<SimpleRegistry>()
                .StructureMapObjectFactory()
                .Bootstrap(RouteTable.Routes);
        }

        protected void Application_End(object sender, EventArgs e)
        {
            ObjectFactory.Container.Dispose();
        }
    }
}